from django.db import models

# Create your models here.


from django.db import models

from utils.base_models import BaseModel


class Tasks(BaseModel):
    """
    任务模型
    """
    id = models.AutoField(verbose_name='id主键', primary_key=True, help_text='id主键')
    epic_name = models.CharField(verbose_name='史诗',max_length=500, help_text='史诗', null=True, default=None)
    story_name = models.CharField('故事', max_length=500, help_text='故事', null=True, default=None)
    task_id = models.CharField('任务id', max_length=500, help_text='任务id', null=True, default=None,unique=True)
    task_name = models.CharField('任务名称', max_length=500, help_text='任务名称', null=True, default=None)
    task_type = models.CharField('任务类型', max_length=500, help_text='任务类型', null=True, default=None)
    project = models.CharField('项目', max_length=500, help_text='项目', null=True, default=None)
    fc_publish_version = models.CharField('版本', max_length=500, help_text='版本', null=True, default=None)
    product_manager = models.CharField('产品经理', max_length=500, help_text='产品经理', null=True, default=None)
    status = models.CharField('任务状态', max_length=500, help_text='任务状态', null=True, default=None)
    fc_responsible_person = models.CharField('任务创建人', max_length=500, help_text='任务创建人', null=True, default=None)
    estimate_time = models.DecimalField('预计工时', decimal_places=2, max_digits=65, help_text='预计工时', null=True,
                                        default=None)
    fc_plan_start_time = models.DateField('任务预计开始日期', max_length=500, help_text='任务预计开始日期', null=True,
                                   default=None)
    fc_plan_end_time = models.DateField('任务预计结束日期', max_length=500, help_text='任务预计结束日期', null=True, default=None)
    fc_actual_start_time = models.CharField('任务实际开始日期', max_length=500, help_text='任务实际开始日期', null=True,
                                   default=None)
    fc_actual_end_time = models.CharField('任务实际结束日期', max_length=500, help_text='任务实际结束日期', null=True, default=None)

    class Meta:
        app_label = 'tasks'
        db_table = 'tb_tasks'
        verbose_name = '任务表'
        verbose_name_plural = verbose_name
        ordering = ('fc_plan_start_time',)
